dhcpv4: some more cleanups to dhcpv4_handle_msg()
authorDavid Härdeman <[email protected]>
Sun, 5 Oct 2025 18:35:23 +0000 (20:35 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 21 Oct 2025 17:04:19 +0000 (19:04 +0200)
commitbe864ccf9919bcfbc5c0c0274f5acf77e29b42a1
treeed88e70c4e97e62c56beeadb1fcb9c5cbf2a8b8a
parentf87464520564ff2eb0f5636f3bc4cd36952b7ef8
dhcpv4: some more cleanups to dhcpv4_handle_msg()

Most notably, neither hostname, nor reqopts actually need to be copied from
req, they are used in a read-only fashion throughout the rest of the function
(and any functions it calls). Also switch some complicated if-else constructs
over to switch-case.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/278
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/dhcpv4.c
src/dhcpv4.h
src/odhcpd.h